/**
 * 数组去重方法
 * @param {*} arr 
 * @return {Array}
 */

// 方法一：
let unique1  = arr =>{
    let obj = {};
    return arr.filter((ele) => {
        return obj.hasOwnProperty(typeof ele + ele) ? false : (obj[typeof ele + ele] = true)
    })
}
// 方法二 ：

var unique2 = arr => {
    return  [...new Set(ar)]
} 

var ar = [2,4,5,7,2,6,444,444,3,4,6,7,3,6]
console.log(unique1( ar ),unique2( ar ));